<!doctype html>
<html xmlns:th="http://www.thymeleaf.org" xmlns:dt="http://www.thymeleaf.org/dandelion/datatables">
<head>
</head>
<body>
   <table>
      <thead>
         <tr>
            <th>foo</th>
         </tr>
      </thead>
      <tbody>
         <tr>
            <td>bar</td>
         </tr>
      </tbody>
   </table>
   <table id="myTableId" dt:table="true" dt:export="csv">
      <thead>
         <tr>
            <th>Id</th>
            <th>Firstname</th>
            <th>Lastname</th>
            <th>City</th>
            <th>Mail</th>
         </tr>
      </thead>
      <tbody>
         <tr th:each="person : ${persons}">
            <td th:text="${person.id}">1</td>
            <td th:text="${person.firstName}">John</td>
            <td th:text="${person.lastName}">Doe</td>
            <td
               th:text="${person.address != null and person.address.town != null} ? ${person.address.town.name} : ''">Nobody
               knows!</td>
            <td><a th:href="${'mailto:' + person.mail}" th:text="${person.mail}">john@doe.com</a></td>
         </tr>
      </tbody>
   </table>
   <table id="myTableId2" dt:table="false" dt:export="csv">
      <thead>
         <tr>
            <th>Id</th>
            <th>Firstname</th>
            <th>Lastname</th>
            <th>City</th>
            <th>Mail</th>
         </tr>
      </thead>
      <tbody>
         <tr th:each="person : ${persons}">
            <td th:text="${person.id}">1</td>
            <td th:text="${person.firstName}">John</td>
            <td th:text="${person.lastName}">Doe</td>
            <td
               th:text="${person.address != null and person.address.town != null} ? ${person.address.town.name} : ''">Nobody
               knows!</td>
            <td><a th:href="${'mailto:' + person.mail}" th:text="${person.mail}">john@doe.com</a></td>
         </tr>
      </tbody>
   </table>
   <table>
      <thead>
         <tr>
            <th>foo2</th>
         </tr>
      </thead>
      <tbody>
         <tr>
            <td>bar2</td>
         </tr>
      </tbody>
   </table>
</body>
</html>